-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zen2] Introduce LeaderChecker #33024
[Zen2] Introduce LeaderChecker #33024
Conversation
It is important that follower nodes periodically check that their leader is still healthy and that they remain part of its cluster. If these checks fail repeatedly then followers should attempt to find and join a new leader, possibly electing one in the process. The LeaderChecker, introduced in this commit, performs these periodic checks and deals with retries.
Pinging @elastic/es-distributed |
Failed CI because of #29880. @elasticmachine test this please. @ywelsch this failed CI for unrelated reasons, and is ready for a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a few smaller comments, but looks very good already.
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/cluster/coordination/LeaderChecker.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/transport/TransportService.java
Outdated
Show resolved
Hide resolved
test/framework/src/main/java/org/elasticsearch/cluster/coordination/DeterministicTaskQueue.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It is important that follower nodes periodically check that their leader is
still healthy and that they remain part of its cluster. If these checks fail
repeatedly then followers should attempt to find and join a new leader,
possibly electing one in the process. The LeaderChecker, introduced in this
commit, performs these periodic checks and deals with retries.